"""
Hunger Games Competition - Strategy

First round:
     * Hunt with half of the other players.

Other rounds:
    * Calculate times_to_hunt as the sum of other players reputations, rounded
      down to the nearest integer.

    * Select the times_to_hunt players with the highest reputation to hunt
      with.
"""


def hunt_choices(round_number, current_food, current_reputation, m,
                 player_reputations):
    num_others = len(player_reputations)

    if round_number == 1:
        half = num_others / 2
        return ['h'] * half + ['s'] * (num_others - half)

    times_to_hunt = int(sum(player_reputations))
    choices = ['s'] * num_others
    players = sorted(zip(player_reputations, range(num_others)), reverse=True)
    for rep, i in players:
        if times_to_hunt > 0:
            times_to_hunt -= 1
            choices[i] = 'h'
        else:
            break

    return choices


def hunt_outcomes(food_earnings):
    pass


def round_end(award, m, number_hunters):
    pass
